System and method for batch transport using hardware accelerators

ABSTRACT

A method, computer program product, and computer system for maintaining, at a computing device, one or more tuples in a software-level queue. The one or more tuples may be transported as a batch of the one or more tuples from the software-level queue to a first queue for processing at a hardware accelerator. After processing the one or more tuples, the one or more tuples may be transported from the first queue to a second queue at the hardware accelerator. The one or more tuples may be transported from the second queue to a next location.

RELATED APPLICATIONS

The subject application is a continuation application of U.S. patentapplication Ser. No. 15/133,438, filed on Apr. 20, 2016, the entirecontents of which are herein incorporated by reference.

BACKGROUND

In certain environments (e.g., a distributed programming environment),the response times of the application, or the overall throughput thatthe environment may process, may be dictated by the slowest part of thatdistributed environment. For instance, with Streams programming, theoverall operator graph may be slowed down by the weakest link. Thisweakest link may be evidenced by the “backpressure” that exists, whichmay be effectively the queue of tuples waiting to be processedone-by-one by an operator.

BRIEF SUMMARY OF DISCLOSURE

In one example implementation, a method, performed by one or morecomputing devices, may include but is not limited to maintaining, at acomputing device, one or more tuples in a software-level queue. The oneor more tuples may be transported as a batch of the one or more tuplesfrom the software-level queue to a first queue for processing at ahardware accelerator. After processing the one or more tuples, the oneor more tuples may be transported from the first queue to a second queueat the hardware accelerator. The one or more tuples may be transportedfrom the second queue to a next location.

One or more of the following example features may be included. The firstqueue may include a hardware accelerator-level backpressure queue. Thesecond queue may include a hardware accelerator-level result queue. Thenext location may include a software layer to a subsequent operator. Thehardware accelerator may include a Field-Programmable Gate Array. An APItransport layer between the software-level queue and the first queue maytransport the one or more tuples from the software-level queue to thefirst queue for processing. An API transport layer between the secondqueue and the next location may manage changing the batch of the one ormore tuples into a stream of the one or more tuples.

In another example implementation, a computing system may include one ormore processors and one or more memories configured to performoperations that may include but are not limited to maintaining one ormore tuples in a software-level queue. The one or more tuples may betransported as a batch of the one or more tuples from the software-levelqueue to a first queue for processing at a hardware accelerator. Afterprocessing the one or more tuples, the one or more tuples may betransported from the first queue to a second queue at the hardwareaccelerator. The one or more tuples may be transported from the secondqueue to a next location.

One or more of the following example features may be included. The firstqueue may include a hardware accelerator-level backpressure queue. Thesecond queue may include a hardware accelerator-level result queue. Thenext location may include a software layer to a subsequent operator. Thehardware accelerator may include a Field-Programmable Gate Array. An APItransport layer between the software-level queue and the first queue maytransport the one or more tuples from the software-level queue to thefirst queue for processing. An API transport layer between the secondqueue and the next location may manage changing the batch of the one ormore tuples into a stream of the one or more tuples.

In another example implementation, a computer program product may resideon a computer readable storage medium having a plurality of instructionsstored thereon which, when executed across one or more processors, maycause at least a portion of the one or more processors to performoperations that may include but are not limited to maintaining one ormore tuples in a software-level queue. The one or more tuples may betransported as a batch of the one or more tuples from the software-levelqueue to a first queue for processing at a hardware accelerator. Afterprocessing the one or more tuples, the one or more tuples may betransported from the first queue to a second queue at the hardwareaccelerator. The one or more tuples may be transported from the secondqueue to a next location.

One or more of the following example features may be included. The firstqueue may include a hardware accelerator-level backpressure queue. Thesecond queue may include a hardware accelerator-level result queue. Thenext location may include a software layer to a subsequent operator. Thehardware accelerator may include a Field-Programmable Gate Array. An APItransport layer between the software-level queue and the first queue maytransport the one or more tuples from the software-level queue to thefirst queue for processing. An API transport layer between the secondqueue and the next location may manage changing the batch of the one ormore tuples into a stream of the one or more tuples.

The details of one or more example implementations are set forth in theaccompanying drawings and the description below. Other possible examplefeatures and/or possible example advantages will become apparent fromthe description, the drawings, and the claims. Some implementations maynot have those possible example features and/or possible exampleadvantages, and such possible example features and/or possible exampleadvantages may not necessarily be required of some implementations.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is an example diagrammatic view of a batch transport processcoupled to a distributed computing network according to one or moreexample implementations of the disclosure;

FIG. 2 is an example diagrammatic view of a client electronic device ofFIG. 1 according to one or more example implementations of thedisclosure;

FIG. 3 is an example flowchart of the batch transport process of FIG. 1according to one or more example implementations of the disclosure; and

FIG. 4 is an example environment 400 according to one or more exampleimplementations of the disclosure.

Like reference symbols in the various drawings indicate like elements.

DETAILED DESCRIPTION

System Overview:

As will be discussed in greater detail, the present disclosure mayinclude techniques to intelligently handle backpressure at programmablehardware locations, e.g., within a Streams operator graph by usingdynamic batch transport. In some implementations, the disclosure maymake use of the fact that the amount of time that may be needed totransport data to and from a FPGA may have a large constant term thatmay often outweigh the small linear term based on the size of that data(e.g., TransportTime=50 microseconds+1 microsecond*NumberOfTuples). Thetime needed to transport a single tuple may potentially be on the sameorder necessary to process many tuples using the FPGA.

As will be appreciated by one skilled in the art, aspects of the presentdisclosure may be embodied as a system, a method, and/or a computerprogram product at any possible technical detail level of integration.The computer program product may include a computer readable storagemedium (or media) having computer readable program instructions thereonfor causing a processor to carry out aspects of the present invention.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable storage medium can be a tangible devicethat can retain and store instructions for use by an instructionexecution device. The computer readable storage medium may be, forexample, but is not limited to, an electronic storage device, a magneticstorage device, an optical storage device, an electromagnetic storagedevice, a semiconductor storage device, or any suitable combination ofthe foregoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, configuration data for integrated circuitry, oreither source code or object code written in any combination of one ormore programming languages, including an object oriented programminglanguage such as Smalltalk, C++, or the like, and procedural programminglanguages, such as the “C” programming language or similar programminglanguages. The computer readable program instructions may executeentirely on the user's computer, partly on the user's computer, as astand-alone software package, partly on the user's computer and partlyon a remote computer or entirely on the remote computer or server. Inthe latter scenario, the remote computer may be connected to the user'scomputer through any type of network, including a local area network(LAN) or a wide area network (WAN), or the connection may be made to anexternal computer (for example, through the Internet using an InternetService Provider). In some embodiments, electronic circuitry including,for example, programmable logic circuitry, field-programmable gatearrays (FPGA), or programmable logic arrays (PLA) may execute thecomputer readable program instructions by utilizing state information ofthe computer readable program instructions to personalize the electroniccircuitry, in order to perform aspects of the present invention.

Computer program code for carrying out operations for aspects of thepresent disclosure may be written in any combination of one or moreprogramming languages, including an object oriented programming languagesuch as Java, Python, Scala, Ruby, and Node.js, Smalltalk, C++ or thelike and conventional procedural programming languages, such as the “C”programming language or similar programming languages. The program codemay execute entirely on the user's computer, partly on the user'scomputer, as a stand-alone software package, partly on the user'scomputer and partly on a remote computer or entirely on the remotecomputer or server. In the latter scenario, the remote computer may beconnected to the user's computer through any type of network, includinga local area network (LAN) or a wide area network (WAN), or theconnection may be made to an external computer (for example, through theInternet using an Internet Service Provider).

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the blocks may occur out of theorder noted in the Figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

Referring now to the example implementation of FIG. 1, there is shownbatch transport (BT) process 10 that may reside on and may be executedby a computer (e.g., computer 12), which may be connected to a network(e.g., network 14) (e.g., the internet or a local area network).Examples of computer 12 (and/or one or more of the client electronicdevices noted below) may include, but are not limited to, a personalcomputer(s), a laptop computer(s), mobile computing device(s), a servercomputer, a series of server computers, a mainframe computer(s), or acomputing cloud(s). Computer 12 may execute an operating system, forexample, but not limited to, Microsoft® Windows®; Mac® OS X®; Red Hat®Linux®, or a custom operating system. (Microsoft and Windows areregistered trademarks of Microsoft Corporation in the United States,other countries or both; Mac and OS X are registered trademarks of AppleInc. in the United States, other countries or both; Red Hat is aregistered trademark of Red Hat Corporation in the United States, othercountries or both; and Linux is a registered trademark of Linus Torvaldsin the United States, other countries or both).

In some implementations, as will be discussed below in greater detail,BT process 10 may maintain, at a computing device, one or more tuples ina software-level queue. The one or more tuples may be transported as abatch of the one or more tuples from the software-level queue to a firstqueue for processing at a hardware accelerator. After processing the oneor more tuples, the one or more tuples may be transported from the firstqueue to a second queue at the hardware accelerator. The one or moretuples may be transported from the second queue to a next location.

In some implementations, the instruction sets and subroutines of BTprocess 10, which may be stored on storage device 16 coupled to computer12, may be executed by one or more processors (not shown) and one ormore memory architectures (not shown) included within computer 12.Storage device 16 may include but is not limited to: a hard disk drive;a flash drive, a tape drive; an optical drive; a RAID array (or otherarray); a random access memory (RAM); and a read-only memory (ROM).

In some implementations, network 14 may be connected to one or moresecondary networks (e.g., network 18), examples of which may include butare not limited to: a local area network; a wide area network; or anintranet, for example.

In some implementations, computer 12 may include a data store, such as adatabase (e.g., relational database, object-oriented database,triplestore database, etc.) and may be located within any suitablememory location, such as storage device 16 coupled to computer 12. Anydata, metadata, information, etc. described throughout the presentdisclosure may be stored in the data store. In some implementations,computer 12 may utilize any known database management system such as,but not limited to, DB2, in order to provide multi-user access to one ormore databases, such as the above noted relational database. The datastore may also be a custom database, such as, for example, a flat filedatabase or an XML database. Any other form(s) of a data storagestructure and/or organization may also be used. In some implementations,BT process 10 may be a component of the data store, a standaloneapplication that interfaces with the above noted data store and/or anapplet/application that is accessed via client applications 22, 24, 26,28. The above noted data store may be, in whole or in part, distributedin a cloud computing topology. In this way, computer 12 and storagedevice 16 may refer to multiple devices, which may also be distributedthroughout the network.

In some implementations, Computer 12 may execute a resource managerapplication (e.g., resource manager application 20), examples of whichmay include, but are not limited to, e.g., any application that allowsfor allocation (and/or temporary allocation loaning) and/or requestingback of machines (and their resources, such as, e.g., primary memory andsecondary memory, processor(s), bandwidth, graphics and sound, networks,cache, etc.) at each of the Map and Reduce steps (or otherwise) toattempt to alleviate stresses placed on a subset of the computingcluster. BT process 10 and/or resource manager application 20 may beaccessed via client applications 22, 24, 26, 28. BT process 10 may be astandalone application, or may be an applet/application/script/extensionthat may interact with and/or be executed within resource managerapplication 20, a component of resource manager application 20, and/orone or more of client applications 22, 24, 26, 28. Resource managerapplication 20 may be a standalone application, or may be anapplet/application/script/extension that may interact with and/or beexecuted within BT process 10, a component of BT process 10, and/or oneor more of client applications 22, 24, 26, 28. One or more of clientapplications 22, 24, 26, 28 may be a standalone application, or may bean applet/application/script/extension that may interact with and/or beexecuted within and/or be a component of BT process 10 and/or resourcemanager application 20. Examples of client applications 22, 24, 26, 28may include, but are not limited to, e.g., any application that allowsfor allocation (and/or temporary allocation loaning) and/or requestingback of machines (and their resources, such as, e.g., primary memory andsecondary memory, processor(s), bandwidth, graphics and sound, networks,cache, etc.) at each of the Map and Reduce steps (or otherwise) toattempt to alleviate stresses placed on a subset of the computingcluster, a standard and/or mobile web browser, an email application(e.g., an email client application), a textual and/or a graphical userinterface, a customized web browser, a plugin, an ApplicationProgramming Interface (API), a streaming application platform, or acustom application. The instruction sets and subroutines of clientapplications 22, 24, 26, 28, which may be stored on storage devices 30,32, 34, 36, coupled to client electronic devices 38, 40, 42, 44, may beexecuted by one or more processors (not shown) and one or more memoryarchitectures (not shown) incorporated into client electronic devices38, 40, 42, 44.

Storage devices 30, 32, 34, 36, may include but are not limited to: harddisk drives; flash drives, tape drives; optical drives; RAID arrays;random access memories (RAM); and read-only memories (ROM). Examples ofclient electronic devices 38, 40, 42, 44 (and/or computer 12) mayinclude, but are not limited to, a personal computer (e.g., clientelectronic device 38), a laptop computer (e.g., client electronic device40), a smart/data-enabled, cellular phone (e.g., client electronicdevice 42), a notebook computer (e.g., client electronic device 44), atablet (not shown), a server (not shown), a television (not shown), asmart television (not shown), a media (e.g., video, photo, etc.)capturing device (not shown), and a dedicated network device (notshown). Client electronic devices 38, 40, 42, 44 may each execute anoperating system, examples of which may include but are not limited to,Android™, Apple® iOS®, Mac® OS X®; Red Hat® Linux®, or a customoperating system.

One or more of client applications 22, 24, 26, 28 may be configured toeffectuate some or all of the functionality of BT process 10 (and viceversa). Accordingly, BT process 10 may be a purely server-sideapplication, a purely client-side application, or a hybridserver-side/client-side application that is cooperatively executed byone or more of client applications 22, 24, 26, 28 and/or BT process 10.

One or more of client applications 22, 24, 26, 28 may be configured toeffectuate some or all of the functionality of resource managerapplication 20 (and vice versa). Accordingly, resource managerapplication 20 may be a purely server-side application, a purelyclient-side application, or a hybrid server-side/client-side applicationthat is cooperatively executed by one or more of client applications 22,24, 26, 28 and/or resource manager application 20. As one or more ofclient applications 22, 24, 26, 28, BT process 10, and resource managerapplication 20, taken singly or in any combination, may effectuate someor all of the same functionality, any description of effectuating suchfunctionality via one or more of client applications 22, 24, 26, 28, BTprocess 10, resource manager application 20, or combination thereof, andany described interaction(s) between one or more of client applications22, 24, 26, 28, BT process 10, resource manager application 20, orcombination thereof to effectuate such functionality, should be taken asan example only and not to limit the scope of the disclosure.

Users 46, 48, 50, 52 may access computer 12 and BT process 10 (e.g.,using one or more of client electronic devices 38, 40, 42, 44) directlythrough network 14 or through secondary network 18. Further, computer 12may be connected to network 14 through secondary network 18, asillustrated with phantom link line 54. BT process 10 may include one ormore user interfaces, such as browsers and textual or graphical userinterfaces, through which users 46, 48, 50, 52 may access BT process 10.

The various client electronic devices may be directly or indirectlycoupled to network 14 (or network 18). For example, client electronicdevice 38 is shown directly coupled to network 14 via a hardwirednetwork connection. Further, client electronic device 44 is showndirectly coupled to network 18 via a hardwired network connection.Client electronic device 40 is shown wirelessly coupled to network 14via wireless communication channel 56 established between clientelectronic device 40 and wireless access point (i.e., WAP) 58, which isshown directly coupled to network 14. WAP 58 may be, for example, anIEEE 802.11a, 802.11b, 802.11g, Wi-Fi®, and/or Bluetooth™ (includingBluetooth™ Low Energy) device that is capable of establishing wirelesscommunication channel 56 between client electronic device 40 and WAP 58.Client electronic device 42 is shown wirelessly coupled to network 14via wireless communication channel 60 established between clientelectronic device 42 and cellular network/bridge 62, which is showndirectly coupled to network 14.

Some or all of the IEEE 802.11x specifications may use Ethernet protocoland carrier sense multiple access with collision avoidance (i.e.,CSMA/CA) for path sharing. The various 802.11x specifications may usephase-shift keying (i.e., PSK) modulation or complementary code keying(i.e., CCK) modulation, for example. Bluetooth™ (including Bluetooth™Low Energy) is a telecommunications industry specification that allows,e.g., mobile phones, computers, smart phones, and other electronicdevices to be interconnected using a short-range wireless connection.Other forms of interconnection (e.g., Near Field Communication (NFC))may also be used.

Referring also to FIG. 2, there is shown a diagrammatic view of clientelectronic device 38. While client electronic device 38 is shown in thisfigure, this is for example purposes only and is not intended to be alimitation of this disclosure, as other configurations are possible.Additionally, any computing device capable of executing, in whole or inpart, BT process 10 may be substituted for client electronic device 38within FIG. 2, examples of which may include but are not limited tocomputer 12 and/or client electronic devices 40, 42, 44.

Client electronic device 38 may include a processor and/ormicroprocessor (e.g., microprocessor 200) configured to, e.g., processdata and execute the above-noted code/instruction sets and subroutines.Microprocessor 200 may be coupled via a storage adaptor (not shown) tothe above-noted storage device(s) (e.g., storage device 30). An I/Ocontroller (e.g., I/O controller 202) may be configured to couplemicroprocessor 200 with various devices, such as keyboard 206,pointing/selecting device (e.g., touchpad, touchscreen, mouse 208,etc.), custom device (e.g., device 215), USB ports (not shown), andprinter ports (not shown). A display adaptor (e.g., display adaptor 210)may be configured to couple display 212 (e.g., touchscreen monitor(s),plasma, CRT, or LCD monitor(s), etc.) with microprocessor 200, whilenetwork controller/adaptor 214 (e.g., an Ethernet adaptor) may beconfigured to couple microprocessor 200 to the above-noted network 14(e.g., the Internet or a local area network).

In certain environment (e.g., a distributed programming environment),the response times of the application, or the overall throughput thatthe environment may process, may be dictated by the slowest part of thatdistributed environment. For instance, with Streams programming, theoverall operator graph may be slowed down by the weakest link. Thisweakest link may be evidenced by the “backpressure” that exists, whichmay be effectively the queue of tuples waiting to be processedone-by-one by an operator. With the nascent introduction of hardwareacceleration to stream computing, there may arise a situation where thedata transfer to and from programmable hardware, such as FPGAs, maypotentially take longer than the actual processing of that data by theFPGA, thereby erasing potential performance gains. Thus, as will bediscussed in greater detail below, the present disclosure may be used tointelligently handle backpressure in the case of, e.g., FPGAs. While thepresent disclosure may be described using FPGAs, it will be appreciatedthat other examples of hardware accelerators may be used withoutdeparting from the scope of the present disclosure.

The BT Process:

As discussed above and referring also at least to the exampleimplementations of FIGS. 3-4, batch transport (BT) process 10 maymaintain 300, at a computing device, one or more tuples in asoftware-level queue. BT process 10 may transport 302 the one or moretuples as a batch of the one or more tuples from the software-levelqueue to a first queue for processing at a hardware accelerator. Afterprocessing the one or more tuples, BT process 10 may transport 304 theone or more tuples from the first queue to a second queue at thehardware accelerator. BT process 10 may transport 306 the one or moretuples from the second queue to a next location.

In some implementations, BT process 10 may maintain 300, at a computingdevice (e.g., computer 12), one or more tuples in a software-levelqueue. For instance, and referring at least to FIG. 4, an exampleenvironment 400 is shown. In the example, further assume that there is abacklog of tuples in the queue (e.g., software-level queue 402) waitingto be processed by the operator that runs on programmable hardware(e.g., a hardware accelerator, such as FPGA 404). In someimplementations, BT process 10 may go through phases of backpressure,where BT process 10 may not be able to keep up with all of the incomingdata, resulting in backpressure. In some implementations, asbackpressure is being experienced, BT process 10 may maintain 300 thetuples in software-level queue 402 as they arrive to the FPGA operator.In some implementations, the use of software-level queue 402 mayindicate backpressure, which may be monitored by BT process 10 (e.g.,via resource manager application 20). In the example, the operator thatruns on FPGA 404 may include BT process 10. Thus, in the example, theremay be a situation where there is a FPGA operator that is the slowestpoint in an operator graph.

In some implementations, BT process 10 may transport 302 the one or moretuples as a batch of the one or more tuples from the software-levelqueue to a first queue for processing at a hardware accelerator. Forexample, BT process 10 may transport 302 some or all of the tuples fromsoftware-level queue 402 to the first queue in the hardware accelerator.In some implementations, BT process 10 may change the one or more tuplesinto a batch for transport 302 to the first queue. As will be discussedin greater detail, an API transport layer may exist betweensoftware-level queue 402 and the first queue. The API layer (e.g., viaBT process 10) may change the one or more tuples into a batch byemptying one or more of the tuples in software-level queue 402 into adata structure (e.g., a queue data structure), where that data structuremay be transported down to the hardware accelerator. When this datastructure reaches the hardware accelerator, BT process 10 may unload thetuples from the data structure into the first queue for processing.

In some implementations, the first queue may include a hardwareaccelerator-level backpressure queue. In the example, the hardwareaccelerator-level backpressure queue (e.g., hardware accelerator-levelbackpressure queue 406) may be at the programmable hardware level of thehardware accelerator, and may contain the local backlog of tupleswaiting to be processed (e.g., by BT process 10).

In some implementations, an API transport layer between software-levelqueue 402 and the first queue (e.g., hardware accelerator-levelbackpressure queue 406) may transport 302 the one or more tuples fromsoftware-level queue 402 to hardware accelerator-level backpressurequeue 406 for processing. In some implementation, the tuples may betransported 302 from software-level queue 402 to hardwareaccelerator-level backpressure queue 406 as fast as possible taking intoaccount certain system limitations (e.g., bandwidth). In someimplementations, it may take about the same amount of time to transport302, e.g., 5 tuples, to the programmable hardware layer as it does totransport, e.g., 1 tuple. Thus, in the example, BT process 10 maytransfer the entire content of software-level backpressure queue 402 tohardware accelerator-level backpressure queue 406 every time any tupleis transported 302 through the hardware accelerator API layer. In someimplementations, the API transport layer between software-levelbackpressure queue 402 and hardware accelerator-level backpressure queue406 may manage (e.g., via BT process 10) removal from the softwarequeue, transport 302, and insertion into hardware accelerator-levelbackpressure queue 406.

In some implementations, e.g., where there is no backpressure due to thesystem keeping up with data rates, then transporting 302 the entirequeue may mean transporting one tuple at a time. For instance, in theexample of a freely flowing streams graph without any backpressure, thissame implementation may be applied. In the example, there may be queuesizes of one tuple at a time and BT process 10 may transport 302 onetuple at a time. In some implementations, the above-noted API layer(e.g., via BT process 10) may also optimize for performance by choosingoptimal batch sizes for transport 302. For example, if transporting 302all tuples in software-level backpressure queue 402 to hardwareaccelerator-level backpressure queue 406 is not optimal, and/or ifhardware accelerator-level backpressure queue 406 is full, BT process 10(e.g., via the API layer) may manage the queue sizes, such that a batchwith a minimum to maximum number of tuples in the batch may betransported 302. Thus, the transport interface API layer may enable thetransport 302 of a dynamic number of queue elements (each element beinga tuple).

In some implementations, the hardware accelerator may include aField-Programmable Gate Array. It will be appreciated that other typesof hardware accelerators may be used without departing from the scope ofthe disclosure. As such, the description of using a Field-ProgrammableGate Array (FPGA) should be taken as example only and not to otherwiselimit the scope of the disclosure.

In some implementations, after processing the one or more tuples, BTprocess 10 may transport 304 the one or more tuples from the first queueto a second queue at the hardware accelerator. For instance, in someimplementations, the second queue may include a hardwareaccelerator-level result queue. The elements (e.g., tuples) in hardwareaccelerator-level backpressure queue 406 may be processed (e.g., via BTprocess 10) sequentially, and processed tuples may be transported 304 inthe output “awaiting transport” queue (e.g., hardware accelerator-levelresult queue 408). In some implementations, hardware accelerator-levelresult queue 408 may be at the programmable hardware level. In someimplementations, BT process 10 may wait until hardware accelerator-levelresult queue 404 has the same number of tuples as transported tosoftware-level backpressure queue 402, and then transport 304 them as abatch of tuples to hardware accelerator-level result queue 408. Forinstance, assume for example purposes only that 5 tuples have beentransported to software-level backpressure queue 402. In the example, BTprocess 10 may wait until hardware accelerator-level result queue 404has the same number of received tuples (e.g., 5), and then transport 304them as a batch of tuples to hardware accelerator-level result queue408.

In some implementations, the above-noted API layer (e.g., via BT process10) may also optimize for performance by choosing optimal batch sizesfor transport 304. For example, if transporting 304 all tuples inhardware accelerator-level backpressure queue 406 to hardwareaccelerator-level result queue 408 is not optimal, and/or if hardwareaccelerator-level result queue 408 is full, BT process 10 (e.g., via theAPI layer) may manage the queue sizes, such that a batch with a minimumto maximum number of tuples in the batch may be transported 304. Thus,the transport interface API layer may enable the transport 304 of adynamic number of queue elements (each element being a tuple).

In some implementations, BT process 10 may transport 306 the one or moretuples from the second queue to a next location. In someimplementations, the next location may include the network interface. Insome implementations, the next location may include a software layer toa subsequent operator. In some implementations, the tuple(s) processedmay be transported 306 directly from hardware accelerator-level resultqueue 408 to the software layer and on to the next (e.g., subsequent)operator in its entirety (or to the network interface) with everytransport 306 operation. Similarly to transporting 302 tuples fromsoftware-level backpressure queue 402 to hardware accelerator-levelbackpressure queue 406, BT process 10 may wait until hardwareaccelerator-level result queue 408 has the same number of tuples astransported to hardware accelerator-level backpressure queue 406, andthen transport 306 them as a batch back to the software layer ordirectly to the network interface. For instance, assume for examplepurposes only that 5 tuples have been transported to hardwareaccelerator-level backpressure queue 406. In the example, BT process 10may wait until hardware accelerator-level result queue 408 has the samenumber of received tuples (e.g., 5), and then transport 306 them as abatch of tuples to the software layer or directly to the networkinterface.

In some implementations, the above-noted API layer (e.g., via BT process10) may also optimize for performance by choosing optimal batch sizesfor transport 306. For example, if transporting 306 all tuples inhardware accelerator-level result queue 408 to the software layer (ornetwork interface) is not optimal, and/or if the software layer (ornetwork interface) is itself backed up, BT process 10 (e.g., via the APIlayer) may manage the queue sizes, such that a batch with a minimum tomaximum number of tuples in the batch may be transported 306. Thus, thetransport interface API layer may enable the transport 306 of a dynamicnumber of queue elements (each element being a tuple).

In some implementations, an API transport layer between the second queueand the next location may manage changing the batch of the one or moretuples from a data structure into a stream of the one or more tuples.For instance, the above-noted API transport layer between hardwareaccelerator-level result queue 408 and the stream to the next operatormay (e.g., via BT process 10) manage changing the transported 304 tuplesinto a stream of tuples for consumption by the next operator in theseries. For instance, assume for example purposes only that the APIlayer between hardware accelerator-level result queue 408 and the streamto the next operator (e.g., via BT process 10) may change the one ormore tuples (e.g., again) into a batch by emptying one or more of thetuples in hardware accelerator-level result queue 408 into a datastructure (e.g., a queue data structure). In the example, that datastructure may be transported 306 to the software level as a batch. TheAPI may then remove each tuple from the data structure and submit eachtuple individually, in the order received, to the nextoperator/operators in the streaming graph.

The terminology used herein is for the purpose of describing particularimplementations only and is not intended to be limiting of thedisclosure. As used herein, the singular forms “a”, “an” and “the” areintended to include the plural forms as well, unless the context clearlyindicates otherwise. It will be further understood that the terms“comprises” and/or “comprising,” when used in this specification,specify the presence of stated features, integers, steps (notnecessarily in a particular order), operations, elements, and/orcomponents, but do not preclude the presence or addition of one or moreother features, integers, steps (not necessarily in a particular order),operations, elements, components, and/or groups thereof.

The corresponding structures, materials, acts, and equivalents (e.g., ofall means or step plus function elements) that may be in the claimsbelow are intended to include any structure, material, or act forperforming the function in combination with other claimed elements asspecifically claimed. The description of the present disclosure has beenpresented for purposes of illustration and description, but is notintended to be exhaustive or limited to the disclosure in the formdisclosed. Many modifications, variations, substitutions, and anycombinations thereof will be apparent to those of ordinary skill in theart without departing from the scope and spirit of the disclosure. Theimplementation(s) were chosen and described in order to explain theprinciples of the disclosure and the practical application, and toenable others of ordinary skill in the art to understand the disclosurefor various implementation(s) with various modifications and/or anycombinations of implementation(s) as are suited to the particular usecontemplated.

Having thus described the disclosure of the present application indetail and by reference to implementation(s) thereof, it will beapparent that modifications, variations, and any combinations ofimplementation(s) (including any modifications, variations,substitutions, and combinations thereof) are possible without departingfrom the scope of the disclosure defined in the appended claims.

What is claimed is:
 1. A computer-implemented method comprising:maintaining, at a computing device, one or more tuples in asoftware-level queue; transporting the one or more tuples as a batch ofthe one or more tuples from the software-level queue to a first queue ofa hardware accelerator for processing at the hardware accelerator;transporting, after processing the one or more tuples, the one or moretuples from the first queue to a second queue at the hardwareaccelerator; and transporting the one or more tuples from the secondqueue to a next location.
 2. The computer-implemented method of claim 1wherein the first queue includes a hardware accelerator-levelbackpressure queue.
 3. The computer-implemented method of claim 1wherein the second queue includes a hardware accelerator-level resultqueue.
 4. The computer-implemented method of claim 1 wherein the nextlocation includes a software layer to a subsequent operator.
 5. Thecomputer-implemented method of claim 1 wherein the hardware acceleratorincludes a Field-Programmable Gate Array.
 6. The computer-implementedmethod of claim 1 wherein an API transport layer between thesoftware-level queue and the first queue transports the one or moretuples from the software-level queue to the first queue for processing.7. The computer-implemented method of claim 1 wherein an API transportlayer between the second queue and the next location manages changingthe batch of the one or more tuples into a stream of the one or moretuples.